Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

feat(interactions): allow filtering interactions by function name #107

Merged
merged 1 commit into from
Mar 18, 2024

Conversation

dtfiedler
Copy link
Collaborator

Example:

❯ curl -s http://localhost:3000/v1/contract/bLAgYxAdX2Ry-nt6aH2ixgvJXbpsEYm28NgJgyqfs-U/interactions\?function\=joinNetwork\&pageSize\=2 | jq '.'
{
  "contractTxId": "bLAgYxAdX2Ry-nt6aH2ixgvJXbpsEYm28NgJgyqfs-U",
  "sortKey": "000001384313,0000000000000,c32b0e886cca125d6503c9509eab071a751c1ba05a63070068908a64cbd30e20",
  "interactions": [
    {
      "height": 1384303,
      "timestamp": 1710549800,
      "input": {
        "function": "joinNetwork",
        "observerWallet": "Zwh1vYmwfbESP9-rXVXiNS8Ix0MEsUw5GSiObwkVEDE",
        "qty": 10000,
        "label": "KhangNguyenVNB",
        "fqdn": "khang.pro",
        "port": 443,
        "protocol": "https",
        "properties": "FH1aVetOoulPGqgYukj0VE0wIhDy90WiQoV3U2PeY44",
        "note": "Khang Nguyen from VNBnode (VietNam community) https://t.me/VNBnodegroup 😁"
      },
      "owner": "Zwh1vYmwfbESP9-rXVXiNS8Ix0MEsUw5GSiObwkVEDE",
      "sortKey": "000001384303,0000000000000,ad5c733ad8c2d9f52dd6699805ae487ade8b17ac07eea12aa104addefd940e01",
      "valid": true,
      "id": "qKWdrAx20cgOaaId6T3hkrb7LVvlDBJFVTjWXhTCgBM"
    },
    {
      "height": 1384303,
      "timestamp": 1710549800,
      "input": {
        "function": "joinNetwork",
        "observerWallet": "RuqD0_TLZ4METrEEkipMvJikb4EHT1MGAiZQwP_cOlw",
        "qty": 100000,
        "label": "sacittGateway",
        "fqdn": "sacittnoderunner.store",
        "port": 443,
        "protocol": "https",
        "properties": "FH1aVetOoulPGqgYukj0VE0wIhDy90WiQoV3U2PeY44",
        "note": "sacitt from RuesCommunity"
      },
      "owner": "RuqD0_TLZ4METrEEkipMvJikb4EHT1MGAiZQwP_cOlw",
      "sortKey": "000001384303,0000000000000,77afc04235f0be9d4b11818d09293ec5fc7130e3b41fe6c4ed5352b0bbaf9aa9",
      "valid": false,
      "error": "Insufficient funds for this transaction.",
      "id": "bpqpox719iih9F-IRVHbJW5HjxRHs98ygK62bVTC1Vk"
    }
  ],
  "pages": {
    "page": 1,
    "pageSize": 2,
    "totalPages": 2,
    "totalItems": 3,
    "hasNextPage": true
  },
  "evaluationOptions": {
    "maxInteractionEvaluationTimeSeconds": 3600
  }
}

Example: `curl https://localhost:3000/v1/contract/bLAgYxAdX2Ry-nt6aH2ixgvJXbpsEYm28NgJgyqfs-U?function=joinNetwork`
@dtfiedler dtfiedler requested a review from a team as a code owner March 16, 2024 01:10
@dtfiedler dtfiedler merged commit 1f86b6e into main Mar 18, 2024
6 checks passed
@dtfiedler dtfiedler deleted the PE-5826-function-filter branch March 18, 2024 14:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants